package com.systemmanger.service;

import com.bean.*;
import com.systemmanger.mapper.GroupMapper;
import com.systemmanger.mapper.TPermGroupMapper;
import com.systemmanger.mapper.TUGMapper;
import com.systemmanger.mapper.YongHuGuanLiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
//
@Service
public class YongHuGuanLiService {
    @Autowired
    YongHuGuanLiMapper yongHuGuanLiMapper;
    @Autowired
    TPermGroupMapper tPermGroupMapper;
    @Autowired
    GroupMapper groupMapper;
    @Autowired
    TUGMapper tugMapper;
    public List<WmsTUser> getUserMessage(WmsTUser wmsTUser){
        return yongHuGuanLiMapper.getUserMessage(wmsTUser);
    }

    public void deleteUserMessage(String uid){
        yongHuGuanLiMapper.deleteCustomerData(uid);
    }
    public List<WmsTGroup> sele(){
        return yongHuGuanLiMapper.sele();
    }
    public WmsTPermission returnPerName(String groupName){
        return yongHuGuanLiMapper.selectPermName(groupName);
    }
    public String selectTUG(String userID){
        return  yongHuGuanLiMapper.selectTUG(userID);
    }
    public void updatePerm(WmsTPermGroup wmsTPermGroup){
        tPermGroupMapper.updatePermId(wmsTPermGroup);
    }

    public String messageTUG(String userID){
        return yongHuGuanLiMapper.messageTUG(userID);
    }

    public String groupIDTGroup(String groupName){
        return groupMapper.groupIDTGroup(groupName);
    }

    public void updateTUG(WmsTUG wmsTUG){
        tugMapper.updateTUG(wmsTUG);
    }

    public void updateUser(WmsTUser wmsTUser){
        yongHuGuanLiMapper.updateUser(wmsTUser);
    }
}
